package com.ruoyi.game.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 玩家信息对象 game_player
 * 
 * @author ruoyi
 * @date 2025-04-18
 */
public class GamePlayer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 昵称 */
    @Excel(name = "昵称")
    private String nickname;

    /** 头像URL */
    @Excel(name = "头像URL")
    private String avatar;

    /** 性别(0女1男) */
    @Excel(name = "性别(0女1男)")
    private int sex;

    /** 是否机器人(0否1是) */
    @Excel(name = "是否机器人(0否1是)")
    private boolean isRobot;

    /** $column.columnComment */
    private String delFlag;

    /** 登录账号 */
    @Excel(name = "登录账号")
    private String username;

    /** 密码(BCrypt) */
    @Excel(name = "密码(BCrypt)")
    private String password;

    /** 房卡余额 */
    @Excel(name = "房卡余额")
    private Long roomCard;

    /** 最后登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastLogin;

    /** 事务后余额 */
    @Excel(name = "事务后余额")
    private Long balance;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setNickname(String nickname) 
    {
        this.nickname = nickname;
    }

    public String getNickname() 
    {
        return nickname;
    }

    public void setAvatar(String avatar) 
    {
        this.avatar = avatar;
    }

    public String getAvatar() 
    {
        return avatar;
    }

    public void setSex(int sex)
    {
        this.sex = sex;
    }

    public int getSex()
    {
        return sex;
    }

    public void setIsRobot(boolean isRobot)
    {
        this.isRobot = isRobot;
    }

    public boolean getIsRobot()
    {
        return isRobot;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }

    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }

    public void setRoomCard(Long roomCard) 
    {
        this.roomCard = roomCard;
    }

    public Long getRoomCard() 
    {
        return roomCard;
    }

    public void setLastLogin(Date lastLogin) 
    {
        this.lastLogin = lastLogin;
    }

    public Date getLastLogin() 
    {
        return lastLogin;
    }

    public void setBalance(Long balance)
    {
        this.balance = balance;
    }

    public Long getBalance()
    {
        return balance;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("nickname", getNickname())
            .append("avatar", getAvatar())
            .append("sex", getSex())
            .append("isRobot", getIsRobot())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("roomCard", getRoomCard())
            .append("lastLogin", getLastLogin())
            .append("balance", getBalance())
            .toString();
    }
}
